Project Structure
As AI applications grow, organizing code becomes increasingly important. BindAI encourages a modular project structure where agents, workflows, tools, memory, and configuration are separated into dedicated directories. The exact layout is flexible, but the following structure is recommended for most applications.Recommended Layout
Directory Overview
agents/
Contains agent configuration files. Typical contents:- system instructions
- model configuration
- provider configuration
- tools
- memory
- knowledge
workflows/
Contains workflow definitions. Examples include:- customer onboarding
- research automation
- approval flows
- scheduled jobs
tools/
Contains reusable Python tools. Examples:- API clients
- calculators
- search utilities
- database access
- external integrations
memory/
Contains memory providers. Examples:- in-memory provider
- Redis
- PostgreSQL
- custom implementations
knowledge/
Stores documents and retrieval resources. Typical contents include:- PDFs
- Markdown files
- embeddings
- vector indexes
applications/
Applications combine agents, workflows, and tools into complete AI systems. For example:templates/
Contains runnable examples demonstrating BindAI features. Templates are intended as learning resources and starting points for new projects.tests/
Contains automated tests for your project. Testing agents, workflows, and tools independently helps keep applications reliable as they grow.Scaling Projects
A small project may only contain:Large Projects
Enterprise applications often contain multiple agents and workflows. Example:Configuration
Sensitive values should never be stored in source code. Instead, place configuration inside environment variables. Example:Best Practices
- Keep agents focused on a single responsibility.
- Reuse tools across multiple agents.
- Store prompts in YAML files.
- Organize workflows by business process.
- Keep application logic separate from workflow logic.
- Write tests for custom tools and workflows.
- Use templates as starting points instead of modifying framework code.
